import { DatabaseTypes, DbmOptions, DbmService } from '../../src'
import { DB_DATABASE, DB_HOST, DB_PASSWORD, DB_PORT, DB_USER } from '../services/environment'

const path = require('path')

const options = new DbmOptions()

options.database = DatabaseTypes.mariadb
options.sourceFolder = path.join(__dirname, `../../temp/importTables`)

DbmService.fromDatabase(
	{
		databaseType: DatabaseTypes.mariadb,
		host: DB_HOST,
		port: DB_PORT,
		user: DB_USER,
		password: DB_PASSWORD,
		database: DB_DATABASE,
	},
	options.sourceFolder,
	true,
)

